<template>
  <a-card>
    <p v-if="noTitleKey === 'charge_pre_deposit_depositList'">
      <component :is="deList"></component>
    </p>
    <p v-if="noTitleKey === 'charge_pre_deposit_depositStore'">
      <component :is="deStore"></component>
    </p>
    <p v-if="noTitleKey === 'charge_pre_deposit_depositSet'">
      <component :is="deSet"></component>
    </p>
  </a-card>
</template>
<script>
import charge_pre_deposit_depositList from './depositList'
import charge_pre_deposit_depositStore from './depositStore'
import charge_pre_deposit_depositSet from './depositSet'
export default {
    name: 'charge_pre_deposit_index',
    components: { charge_pre_deposit_depositList, charge_pre_deposit_depositStore, charge_pre_deposit_depositSet },
    data() {
        return {
            noTitleKey: 'charge_pre_deposit_depositList',
            tabs: {
                active: () => this.noTitleKey,
                callback: key => {
                    console.log(key)
                    this.noTitleKey = key
                },
                items: [
                    {
                        key: 'charge_pre_deposit_depositList',
                        title: '预存款管理'
                    },
                    {
                        key: 'charge_pre_deposit_depositStore',
                        title: '预存款明细'
                    },
                    {
                        key: 'charge_pre_deposit_depositSet',
                        title: '预存款设置'
                    }
                ]
            },
            deList: 'charge_pre_deposit_depositList',
            deStore: 'charge_pre_deposit_depositStore',
            deSite: 'charge_pre_deposit_depositSet'
        }
    },
    created() {
        ;(this.deList = charge_pre_deposit_depositList),
            (this.deStore = charge_pre_deposit_depositStore),
            (this.deSet = charge_pre_deposit_depositSet)
    },
    methods: {
        onTabChange(key, type) {
            console.log(key, type)
            this[type] = key
        }
    }
}
</script>

<style scoped>
</style>